<template>
    <div>
<h2>房价列表</h2>
<table class="table table-bordered">
    <tr>
        <td>id</td>
        <td>房型</td>
        <td>房号</td>
        <td>房价</td>
        <td>操作</td>
    </tr>
    <tr v-for="item in list">
        <td>{{item.hmId}}</td>
        <td>{{item.htName}}</td>
        <td>{{item.hnName}}</td>
        <td>{{item.hmPrice}}</td>
        <td><input type="button" value="投放" /></td>
    </tr>
</table>
    </div>
</template>

<script setup lang="ts">
import { onMounted, reactive, toRefs } from 'vue';
import axios from 'axios';
import { useRouter, useRoute } from 'vue-router';
let router = useRouter()
let data:any = reactive({
    state: {

    },
    list:[]
    
})
let { state,list } = toRefs(data)
onMounted(()=>{
    getlist()
})
const getlist = () => {
   
    axios({
        url: '/api/HouseMoeny/GetHouseMoneys',
        method: 'get',

    })
        .then(res => {
            console.log(res)
           list.value=res.data.data
        })
        .catch(err => {
            console.log(err)
        })
}
</script>

<style scoped>

</style>